-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not send empty test suite spans #5405
Do not send empty test suite spans #5405
Conversation
46afe94
to
c1f09e8
Compare
BenchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases. |
27b4c27
to
80e26c4
Compare
c1f09e8
to
37e559a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed context.
Quick question: any reason the context status is a bunch of cached String in an interface rather than an enum?
It always feel bad to me to have null check everywhere in its codebase. I would have even define an "unknown" status if needed to prevent it.
Otherwise, it's good to me.
I guess I just got used to them being Strings and stopped noticing the inconvenience at some point. An enum is definitely a better choice. Although switching to an enum would require some effort (there are 100+ usages of the String constants in the codebase). I am surely going to do this, but outside of this PR's scope |
What Does This Do
Adds a check to avoid reporting empty test suite spans.
A test suite span is considered empty if it has no children (i.e. suite does not include test cases) and it was not explicitly reported by the test framework as skipped or failed.
Motivation
In certain edge cases a test framework might report a test suite as started, and then all of suite's children might be skipped by Intelligent Test Runner (this happens with parameterized tests in JUnit 5 - the list of test cases is not known in advance, so when suite is started there is no way to know if it will be skipped entirely or not).
These empty suites are confusing for the product's users and must not be reported.